package org.springblade.modules.platform.vo.enums;

import java.util.HashMap;
import java.util.Map;

public enum UntilTypeEnum {
    LARGE_DAM(1,"大坝"),
    MEDIUM_DAM(2,"中坝"),
    SMALL_DAM(3,"小坝"),;

    private Integer code;
    private String msg;

    private static Map<Integer, UntilTypeEnum> valueMap;

    static {
        valueMap = new HashMap<>();
        for (UntilTypeEnum e : values()){
            valueMap.put(e.code, e);
        }
    }
    UntilTypeEnum(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }
    public static UntilTypeEnum getEnum(Integer key) {
        if (!valueMap.containsKey(key)) {
            return null;
        }
        return valueMap.get(key);
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
